package com.techsoul.module.tms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.techsoul.module.tms.pojo.entity.TPoPurchaseOrder;
import com.techsoul.module.tms.pojo.param.TPoPurchaseOrderSearchParam;
import com.techsoul.module.tms.pojo.vo.TPoPurchaseOrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhaowei
 * @since 2021-05-24
 */
public interface TPoPurchaseOrderMapper extends BaseMapper<TPoPurchaseOrder> {
    /**
     * findAll
     *
     * @param params params
     * @return List<PurchaseOrderVo>
     */
    List<TPoPurchaseOrderVo> findAll(@Param("params") TPoPurchaseOrderSearchParam params);
    List<TPoPurchaseOrder> findEntityAll(@Param("params") TPoPurchaseOrderSearchParam params);
    TPoPurchaseOrderVo findById(@Param("id") String id);
    /**
     * findAll
     *
     * @param page page
     * @param params params
     * @return IPage<PurchaseOrderVo>
     */
    IPage<TPoPurchaseOrderVo> findAll(Page page, @Param("params") TPoPurchaseOrderSearchParam params);

    /**
     * findTransportingOrder
     *
     * @param page page
     * @param userId userId
     * @return List<PurchaseOrder>
     */
    List<TPoPurchaseOrder> findTransportingOrder(Page<TPoPurchaseOrder> page, @Param("userId") String userId);

    /**
     * findAllTransportingOrder
     *
     * @param userId userId
     * @return List<PurchaseOrder>
     */
    List<TPoPurchaseOrder> findAllTransportingOrder(@Param("userId") String userId);
}
